<?php
class controller_theme extends controller
{

	public function __construct()
	{

		$my = bone::get_user();

		if($my->guest)
		{
			$model = bone::get_model('user');
			$model->rememberme();
		}


		$menu_id = request('menu_id', 1);

		$main_menu = bone::get_menu('main');
		$foot_menu = bone::get_menu('foot');

		$this->set_data('menu_id', $menu_id);


		$this->set_data('main_menu', $main_menu->get_menu());
		$this->set_data('main_menu_tree', $main_menu->get_menu_tree());
		$this->set_data('main_menu_pathway', $main_menu->get_pathway($menu_id));

		$this->set_data('foot_menu_tree', $foot_menu->get_menu_tree());

		parent::__construct();
	}

}
?>